package com.jzo2o.health.enums;

import com.jzo2o.statemachine.core.StatusChangeEvent;
import com.jzo2o.statemachine.core.StatusDefine;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * TODO
 *
 * @Author whx
 * @Date 2024/12/17 19:44
 */
@Getter
@AllArgsConstructor
public enum OrderStatusChangeEnum implements StatusChangeEvent {

    PAYED(OrderStatusEnum.NO_PAY, OrderStatusEnum.WAITING_CHECKUP, "支付", "payed"),
    VERIFICATION(OrderStatusEnum.WAITING_CHECKUP, OrderStatusEnum.COMPLETED_CHECKUP, "到院检查", "verification"),
    CANCEL(OrderStatusEnum.NO_PAY, OrderStatusEnum.CANCELLED, "用户取消", "cancel"),
    ORDER_TIMEOUT(OrderStatusEnum.NO_PAY, OrderStatusEnum.CANCELLED, "订单超时", "timeout"),
    REFUND(OrderStatusEnum.WAITING_CHECKUP, OrderStatusEnum.CLOSED, "用户发起退款", "refund");

    private final OrderStatusEnum sourceStatus;

    private final OrderStatusEnum targetStatus;

    private final String desc;

    private final String code;
}
